import { useState } from "react"

export function useWindowScrollY() {
    const [y, setY] = useState(0)
    window.addEventListener('scroll', (e) => {
        setY(window.scrollY)
    })
    return [y]
}